<pm:content xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:p="http://primefaces.org/ui"
	xmlns:pm="http://primefaces.org/mobile">

	<h:form id="doctorReservationForm">

		<p:messages id="messages" />

		<p:inputText value="#{mReservationBean.qyDate}" id="qydate" data-role="datebox" type="text" 
			data-options='{"mode": "slidebox"}' />

		<h:panelGrid columns="2" width="100%">
			<p:commandLink type="button" value="#{msgs.button_query}" update="reslist,messages"
				actionListener="#{mReservationBean.queryAction}" />

			<p:commandLink type="button" value="today" actionListener="#{mReservationBean.todayAction}"
				update="reslist,messages" />
		</h:panelGrid>
		<br />

		<p:dataList id="reslist" var="is" value="#{mReservationBean.resList}">
			<f:facet name="header">
				#{mReservationBean.qyDate}
			</f:facet>
			<p:column>
				<p:commandLink action="#{mReservationBean.editReservationAction}" value="#{is[0]}"
					update=":doctorPrivateDetailForm, :doctorPatientDetailForm"
					style="#{is[1] == 2 ? 'color:red' : ''}">
					<f:setPropertyActionListener target="#{mReservationBean.description}" value="#{is[0]}" />
					<f:setPropertyActionListener target="#{mReservationBean.eventType}" value="#{is[1]}" />
					<f:setPropertyActionListener target="#{mReservationBean.eventId}" value="#{is[2]}" />
				</p:commandLink>
			</p:column>
		</p:dataList>
	</h:form>
</pm:content>